<?=$this->load->view('include_header',null)?>
	<div id="top-panel">
		<div id="panel">
			<ul>
				<li class="current"><a href="<?=site_url('archive/idcard/'.$id)?>" class="report"><?=(empty($id))?"录入新":"编辑"?>客户基本信息</a></li>
				<?php if(!empty($info->id)):?><li><a id="printInfo" class="folder_table">打印本页信息</a></li><?php endif;?>
			</ul>
		</div>
	</div>
	<div id="wrapper">
		<div id="content">
			<div id="box">
<!-- table begin -->
<form method="post" id="form"  enctype="multipart/form-data" action="<?=site_url('schengen/jp_student_update/'.$cateid)?>">

	<h3>日本留学调查表</h3>
    <table width="100%">
    <thead>
        <tr>
          <td colspan="3" align="right"><img src="<?= (@$info->avatar)?@$info->avatar:'images/avatar.gif'?>" width="150" height="150" /></td>
		  <td align="right">
		  上传照片<br />
		  <input type="file" name="userphoto" /><br />
		  (.gif|.jpg|.png文件,最大1M)<br />
		  <?php if (@$info->attachment):?><a href="<?= @$info->attachment?>" target="_blank">点击下载附件</a><?php endif; ?>
		  &nbsp;&nbsp;&nbsp;&nbsp;上传附件<br />
		  <input type="file" name="userfile" /><br />
		  (.pdf|.zip|.rar|.doc,最大2M)		  </td>
        </tr>
    </thead>
    <tfoot>
        <tr>
            <td colspan="4" align="right">			
			<input type="hidden" name="id" value="<?=$id?>" />
			<input id="button1" type="submit" value="提交信息" />
			<input id="button2" type="reset" value="重置" />			</td>
        </tr>
    </tfoot>

    <tbody>
        <tr class="odd">
            <td colspan="4" align="center"><strong>留学调查表</strong></td>
        </tr>
        <tr class="even">
            <td>姓名</td>
            <td colspan="3"><input type="text" name="name" value="<?= @$info->name?>" /> 
           &nbsp;&nbsp; ( 
           <input type="radio" name="sex" value="1" <?= (@$info->sex==1)?'checked':''?>/>
           男 
            <input type="radio" name="sex" value="2" <?= (@$info->sex==2)?'checked':''?>/>
           女           ) </td>
        </tr>
        <tr class="odd">
           <td>出生年月</td>
            <td nowrap="nowrap"><select name="birth_y">
              <?php for($i=date("Y");$i>1940;$i--) echo "<option value='$i'".((@$info->birth_y==$i)?"selected":"").">$i</option>"; ?>
            </select>
年
<select name="birth_m">
  <?php for($i=1;$i<=12;$i++) echo "<option value='$i'".((@$info->birth_m==$i)?"selected":"").">$i</option>"; ?>
</select>
月
<select name="birth_d">
  <?php for($i=1;$i<=31;$i++) echo "<option value='$i'".((@$info->birth_d==$i)?"selected":"").">$i</option>"; ?>
</select>
日 &nbsp;(满
<input name="age" type="text" value="<?= @$info->age?>" style="width:20px" />
岁 
              ) </td>
			<td colspan="2">文化程度
				<input type="text" name="degree" value="<?= @$info->degree?>" /></td>
			</tr>
        <tr class="even">
           <td>国家承认的最终学历学校校名</td>
            <td colspan="3"><input name="school_name" type="text" value="<?= @$info->school_name?>" style="width:300px" /> 
           &nbsp;&nbsp; ( 
           <input type="radio" name="school_result" value="1" <?= (@$info->school_result==1)?'checked':''?>/>
           毕业 
            <input type="radio" name="school_result" value="2" <?= (@$info->school_result==2)?'checked':''?>/>
           肄业            
            <input type="radio" name="school_result" value="3" <?= (@$info->school_result==3)?'checked':''?>/>
在读生             
            <input type="radio" name="school_result" value="4" <?= (@$info->school_result==4)?'checked':''?>/>
结业) </td>
        </tr>
        <tr class="odd">
            <td>专业</td>
            <td colspan="3"><input type="text" name="school_major" value="<?= @$info->school_major?>" style="width:500px" /></td>
        </tr>
        <tr class="even">
          <td>学校地址</td>
            <td colspan="3"><input type="text" name="school_province" value="<?= @$info->school_province?>" />
              省 
              <input type="text" name="school_city" value="<?= @$info->school_city?>" />              
               市 
              <input name="school_address" type="text" value="<?= @$info->school_address?>" /></td>
        </tr>
        <tr class="odd">
            <td>前往留学的大学或语言学校名称</td>
            <td><input name="jp_school_name" type="text" value="<?= @$info->jp_school_name?>" style="width:300px" /></td>
			<td>专业</td>
			<td><input name="jp_school_major" type="text" value="<?= @$info->jp_school_major?>" /></td>
        </tr>
        <tr class="even">
           <td>地址</td>
            <td colspan="3">
			<input type="text" name="jp_school_province" value="<?= @$info->jp_school_province?>" />（都、道、府、县）&nbsp;&nbsp;
			<input type="text" name="jp_school_city" value="<?= @$info->jp_school_city?>" />（区、市、郡）&nbsp;&nbsp;
			<input type="text" name="jp_school_address" value="<?= @$info->jp_school_address?>" /></td>
        </tr>
        <tr class="odd">
            <td>迄今为止，有没有学过日语</td>
            <td colspan="3"><input type="radio" name="is_japanese" value="1" <?= (@$info->is_japanese==1)?'checked':''?>/>
              有 
              <input type="radio" name="is_japanese" value="0" <?= (@$info->is_japanese==0)?'checked':''?>/>
              没有</td>
        </tr>
        <tr class="even">
            <td colspan="4">* 校名 
              <input name="training_name" type="text" value="<?= @$info->training_name?>" style="width:300px"/>              
期间 
<input name="training_from_y" type="text" value="<?= @$info->training_from_y?>" style="width:50px" />
年
<input name="training_from_m" type="text" value="<?= @$info->training_from_m?>" style="width:30px"/>
月
<input name="training_from_d" type="text" value="<?= @$info->training_from_d?>" style="width:30px"/>
日 &nbsp;&nbsp;
<input name="training_to_y" type="text" value="<?= @$info->training_to_y?>" style="width:50px"/>
年
<input name="training_to_m" type="text" value="<?= @$info->training_to_m?>" style="width:30px"/>
月
<input name="training_to_d" type="text" value="<?= @$info->training_to_d?>" style="width:30px"/>
日<br />
* 上述情况以外（如工作单位，自学等），则说明具体的学习教材、单词数量、方法、地点及学习期间<br/>
<textarea name="training_detail" ><?= @$info->training_detail?></textarea></td>
        </tr>
		        <tr class="odd">
            <td>有没有参加过日语等级考试              </td>
            <td colspan="3"><input type="radio" name="is_exam" value="1" <?= (@$info->is_exam==1)?'checked':''?>/>
有
  <input type="radio" name="is_exam" value="0" <?= (@$info->is_exam==0)?'checked':''?>/>
没有</td>
        </tr>
        <tr class="even">
            <td colspan="4">考试名称 
              <input name="exam_name" type="text" value="<?= @$info->exam_name?>" />              
               已通过 
              <input type="text" name="exam_degree" value="<?= @$info->exam_degree?>" />              
               级 &nbsp;&nbsp;成绩 
              <input type="text" name="exam_score" value="<?= @$info->exam_score?>" />
              分</td>
        </tr>		
        <tr class="odd">
            <td colspan="4">有关留日的生活费、学费</td>
        </tr>
        <tr class="even">
            <td>* 申请到奖学金没有?</td>
            <td colspan="3">
<input type="radio" name="is_scholarship" value="1" <?= (@$info->is_scholarship==1)?'checked':''?>/>
有
<input type="radio" name="is_scholarship" value="0" <?= (@$info->is_scholarship==0)?'checked':''?>/>
没有</td>
        </tr>
        <tr class="odd">
            <td colspan="4">. 奖学金的名称为 
              <input type="text" name="scholarship" value="<?= @$info->scholarship?>" />              
               ·领取期间  
               <input name="scholarship_from_y" type="text" value="<?= @$info->scholarship_from_y?>" style="width:50px" />
年
<input name="scholarship_from_m" type="text" value="<?= @$info->scholarship_from_m?>" style="width:30px"/>
月 ~   
               <input name="scholarship_to_y" type="text" value="<?= @$info->scholarship_to_y?>" style="width:50px"/>
年
<input name="scholarship_to_m" type="text" value="<?= @$info->scholarship_to_m?>" style="width:30px"/>
月 <br />
金额 
<input type="text" name="scholarship_amount" value="<?= @$info->scholarship_amount?>" /> 万日元（每月）</td>
        </tr>
        <tr class="even">
            <td colspan="4">* 若无奖学金，留日的生活费、学费由谁来负担</td>
        </tr>

        <tr class="odd">
            <td colspan="4">·姓名 
              <input type="text" name="payer" value="<?= @$info->payer?>" />              
               国籍 
              <input type="text" name="payer_country" value="<?= @$info->payer_country?>" />
( 
<input type="radio" name="payer_sex" value="1" <?= (@$info->payer_sex==1)?'checked':''?>/>
男
<input type="radio" name="payer_sex" value="2" <?= (@$info->payer_sex==2)?'checked':''?>/>
女           ) &nbsp;&nbsp; 关系 
<input type="text" name="payer_relate" value="<?= @$info->payer_relate?>" />
<br />
·工作单位（
<input type="radio" name="is_payer_work" value="1" <?= (@$info->is_payer_work==1)?'checked':''?>/>
有
<input type="radio" name="is_payer_work" value="2" <?= (@$info->is_payer_work==2)?'checked':''?>/>
无           ) 
<input type="text" name="payer_work" value="<?= @$info->payer_work?>" /> 
职位 
<input type="text" name="payer_position" value="<?= @$info->payer_position?>" /> 
职位单位固定电话 
<input type="text" name="payer_tel" value="<?= @$info->payer_tel?>" />
<br />
预计支付金额 
<input type="text" name="payer_amount" value="<?= @$info->payer_amount?>" /> 
万日元（
<input type="radio" name="pay_period" value="1" <?= (@$info->pay_period==1)?'checked':''?>/>
每月
<input type="radio" name="pay_period" value="2" <?= (@$info->pay_period==2)?'checked':''?>/>
每年
）<br />
·如果负担学费、生活费的亲属在日本，请选填亲属在日本持有的签证种类：<br/>
<input type="radio" name="payer_type" value="1" <?= (@$info->payer_type==1)?'checked':''?>/> 
日本人配偶者等、
<input type="radio" name="payer_type" value="2" <?= (@$info->payer_type==2)?'checked':''?>/>
永住者 
<input type="radio" name="payer_type" value="3" <?= (@$info->payer_type==3)?'checked':''?>/>
定住者 
<input type="radio" name="payer_type" value="4" <?= (@$info->payer_type==4)?'checked':''?>/>
教授 
<input type="radio" name="payer_type" value="5" <?= (@$info->payer_type==5)?'checked':''?>/>
技术
<input type="radio" name="payer_type" value="6" <?= (@$info->payer_type==6)?'checked':''?>/>
技能
<input type="radio" name="payer_type" value="7" <?= (@$info->payer_type==7)?'checked':''?>/>
人文知识国际业务
<input type="radio" name="payer_type" value="8" <?= (@$info->payer_type==8)?'checked':''?>/>
研究 
<input type="radio" name="payer_type" value="9" <?= (@$info->payer_type==9)?'checked':''?>/>
其它 
<input type="text" name="payer_type_other" value="<?= @$info->payer_type_other?>" /></td>
        </tr>
        <tr class="even">
           <td>有没有亲属在日本？</td>
            <td colspan="3"><input type="radio" name="is_relative" value="1" <?= (@$info->is_relative==1)?'checked':''?>/>
有
  <input type="radio" name="is_relative" value="0" <?= (@$info->is_relative==0)?'checked':''?>/>
没有</td>
        </tr>
        <tr class="odd">
            <td colspan="4">* 姓名 
              <input type="text" name="relative_name" value="<?= @$info->relative_name?>" /> 
              亲属关系 
              <input type="text" name="relative_relate" value="<?= @$info->relative_relate?>" />               <br />
              * 职业、职位（（
<input type="radio" name="is_relative_position" value="1" <?= (@$info->is_relative_position==1)?'checked':''?>/>
有
<input type="radio" name="is_relative_position" value="2" <?= (@$info->is_relative_position==2)?'checked':''?>/>
无           ) 
<input type="text" name="relative_position" value="<?= @$info->relative_position?>" /> <br />
* 亲属在日本持有的签证种类为: 
<input type="radio" name="relative_type" value="1" <?= (@$info->relative_type==1)?'checked':''?>/> 
留学 
<input type="radio" name="relative_type" value="2" <?= (@$info->relative_type==2)?'checked':''?>/>
就学 
<input type="radio" name="relative_type" value="3" <?= (@$info->relative_type==3)?'checked':''?>/>
日本人配偶者等 
<input type="radio" name="relative_type" value="4" <?= (@$info->relative_type==4)?'checked':''?>/>
家族滞在 
<input type="radio" name="relative_type" value="5" <?= (@$info->relative_type==5)?'checked':''?>/>
永住者 
<input type="radio" name="relative_type" value="6" <?= (@$info->relative_type==6)?'checked':''?>/>
定住者 
<input type="radio" name="relative_type" value="7" <?= (@$info->relative_type==7)?'checked':''?>/>
教授 
<input type="radio" name="relative_type" value="8" <?= (@$info->relative_type==8)?'checked':''?>/>
技术 
<input type="radio" name="relative_type" value="9" <?= (@$info->relative_type==9)?'checked':''?>/>
技能 
<input type="radio" name="relative_type" value="10" <?= (@$info->relative_type==10)?'checked':''?>/>
文化活动 
<input type="radio" name="relative_type" value="11" <?= (@$info->relative_type==11)?'checked':''?>/>
人文知识国际业务 
<input type="radio" name="relative_type" value="12" <?= (@$info->relative_type==12)?'checked':''?>/>
研究 
<input type="radio" name="relative_type" value="13" <?= (@$info->relative_type==13)?'checked':''?>/>
其它
<input type="text" name="relative_type_other" value="<?= @$info->relative_type_other?>" /></td>
        </tr>
        <tr class="even">
            <td>是否接受过校方的面试</td>
            <td colspan="3"><input type="radio" name="is_interview" value="1" <?= (@$info->is_interview==1)?'checked':''?>/>
有
  <input type="radio" name="is_interview" value="0" <?= (@$info->is_interview==0)?'checked':''?>/>
没有</td>
        </tr>
        <tr class="odd">
            <td colspan="4">* 时间 &nbsp;
            	<input name="interview_y" type="text" value="<?= @$info->interview_y?>" style="width:50px" />
年
<input name="interview_m" type="text" value="<?= @$info->interview_m?>" style="width:30px"/>
月
<input name="interview_d" type="text" value="<?= @$info->interview_d?>" style="width:30px"/>
日&nbsp;&nbsp;&nbsp;地点 
<input name="interview_address" type="text" value="<?= @$info->interview_address?>" style="width:300px"/></td>
        </tr>
        <tr class="even">
            <td colspan="4">* 面试负责人姓名 
              <input type="text" name="interview_name" value="<?= @$info->interview_name?>" /> 
              &nbsp;&nbsp;&nbsp;校名 
              <input name="interview_school" type="text" value="<?= @$info->interview_school?>" style="width:300px"/></td>
        </tr>
        <tr class="odd">
            <td colspan="4">本人声明：上述填写内容真实有效。</td>
			</tr>
        <tr class="even">
            <td colspan="4">&nbsp;</td>
            </tr>
    </tbody>
	</table>
<!-- table end -->
</form>

			</div>
		</div>
		
		<?=$this->load->view('include_sidebar',array('id'=>$id,'forms'=>$forms))?>
	</div>

<script type="text/javascript">
$().ready(function() {
  $("#form").validate({
    rules: {
		name:"required",
		sex:"required",
		birth_y:"required",
		birth_m:"required",
		birth_d:"required",
		degree:"required",
		school_name:"required",
		school_result:"required"
    }
  });
  
	$.datepicker.setDefaults(
		{
		dateFormat: 'yy/mm/dd',
		changeMonth: true,
		changeYear: true,
		showOn: "both",
		buttonImage: "images/calendar.gif",
		buttonImageOnly: true
		}
	);
	
	$("#birth").datepicker();
	
	$("#email").autoMail();
	

	$("#printInfo").click(function(o) {
		var prints = [
			{rel_id: <?=$cateid?>, rec_id: <?=$id?>}
		]  ;
		
		var jdata = JSON.stringify(prints);
		//alert(jdata);
		$.post("<?=site_url('proxy/does/'.str_replace('==','',base64_encode('http://'.$_SERVER['SERVER_NAME'].':9090/javaprduct/servlet/test')))?>",{clients:jdata},function(msg){alert(msg)});
	});
	
	$("#printInfo").ajaxError(function(event,request, settings){
		//$(this).append("<li>出错页面:" + settings.url + "</li>");
		alert("无法访问"+ settings.url );
	}); 
 
});
</script>

<?=$this->load->view('include_footer',null)?>